<template>
  <div>
    <a-modal :visible="visible" title="Basic Modal" @ok="handleOk" @cancel="closeFn">
    </a-modal>
  </div>

</template>

<script setup lang='ts'>
  const emit = defineEmits(["update:visible",'closeFn'])
  const props = defineProps({
  visible:{
				type:Boolean,
				default:false
			}
		})
    console.log(props.visible)
    // 确认(update语法糖)
    const handleOk = ()=>{
      emit("update:visible", false)
    }
    // 取消
    const closeFn = ()=>{
      emit('closeFn')
    }
</script>

<style lang='less' scoped>
</style>